package cc.wanforme.st.server.authen.anno;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 检查是否拥有某种权限<br>
 * 简化 spring 权限认证注解的使用 @PreAuthorize("hasAuthority('***')") <br>
 * 例如： @PreAuthorize("hasAuthority('test:permission')")  ->   @HasPermission("test:permission")
 */
@Target({ ElementType.METHOD, ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface HasPermission {

	String value();
	
}
